package com.qf.springbootopenapi.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.springbootopenapi.entity.User;
import com.qf.springbootopenapi.vo.UserVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao extends BaseMapper<User> {
    User getUserByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
    
    User getUserByUsername(@Param("username") String username);
    
    Integer insertUser(User user);
    
    Integer selectCount();
    
    List<User> selectUserByPage(@Param("start") Integer start,@Param("limit") Integer limit);
    
    List<User> getAllUser();
    
    Integer updateUserById(User user);
    
    Integer delUserByIds(Integer[] ids);
    
    User selectUserById(@Param("id") Integer id);
    
    List<User> getUsersByCondition(UserVo userVo);
    
    User selectHeadPortrait(@Param("headPortrait") String s);
}
